//
// DbService.h
// ~~~~~~~~~~~~~~
//
//
#ifndef DB_SERVICE_H
#define DB_SERVICE_H

#include <vector>
#include <string>
#include <mysql++.h>

#include "log.h"
#include "message.h"
#include "inOutMsgCenter.h"

struct favorite ;

class DbService
{
private:
    class DbConnectInfo
    {
    public:
        std::string dbName ;
        std::string server ;
        std::string user ;
        std::string password ;
    };
    DbConnectInfo dbConInfo;
    mysqlpp::Connection * pDbCON ;

    void initDbCon () ;

public:
    DbService() ;
    ~DbService() ;

    bool query ( std::string & querySQL, std::vector<favorite> & res ) ;

} ;

#endif //DB_SERVICE_H
